Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libshortfin] Add proper unit tests for device_array, storage, and mapping. #164

Merged
merged 1 commit into from
Sep 4, 2024

Conversation

stellaraccident
Copy link
Contributor

@stellaraccident stellaraccident commented Sep 4, 2024

Includes various enhancements/fixes discovered as testing:

  • Implement Python storage == operator.
  • Fix incorrect logical sense of the buffer read-only flag.
  • Add a str method to device_array which only prints the contents (not all of the other array info).
  • Captures any exception raised by the main coroutine and marshals it to the caller (was printing in an unhandled exception handler and then dropping on the floor).
  • Adds an exception translator for IREE status exceptions, which maps certain status codes to more appropriate Python exception classes.
  • Adds size validation to device_array construct from storage constructor.

These are fairly complete unit level tests of all array functionality, including some scheduling (since the tests await for device idle, which requires that all of the buffer timeline tracking is done properly).

@stellaraccident stellaraccident marked this pull request as ready for review September 4, 2024 02:05
@stellaraccident stellaraccident merged commit b95c7a6 into main Sep 4, 2024
6 of 7 checks passed
@stellaraccident stellaraccident deleted the shortfin_array_tests branch September 4, 2024 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant